package com.cn.esermis.datawarn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cn.esermis.datawarn.entity.MonitoringFactor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

@Mapper
public interface ExceedDataMapper extends BaseMapper<MonitoringFactor> {
    @Select("select hours_avg from monitoring_factor m left join data_acquisition_instrument d on m.data_acquisition_instrument_id = d.id where d.mn_code = #{mn} and m.factor = #{factor}")
    String hoursAvg(@Param("mn") String mn, @Param("factor") String factor);
}
